home *** CD-ROM | disk | FTP | other *** search
/ NOVA - For the NeXT Workstation / NOVA - For the NeXT Workstation.iso / SourceCode / MiniExamples / PerformanceTuning / Winfo / wwrap.psw < prev   
Encoding:
Text File  |  1991-09-18  |  1.8 KB  |  69 lines

  1. /*
  2.  * Winfo
  3.  * by Paul S. Kleppner
  4.  *
  5.  * This program may be freely distributed, but not sold.
  6.  * It is provided without warranty of any kind, expressed or
  7.  * implied, as to its fitness for any particular use.
  8.  */
  9.  
  10. /*
  11.  * This file contains DPS wrappers for a number of
  12.  * functions which deal with windows.  We have to write our
  13.  * own wrappers because we are dealing with true DPS window numbers
  14.  * as known by the window server.  The appkit, and the standard wrappers,
  15.  * seem to use "logical" window numbers which are local to each app.
  16.  */
  17.  
  18. // Look up the window at the given location; returns its
  19. // number, and whether or not one was found.
  20. defineps myFindWindow(float x; float y; int where; int initWin;
  21.     |float *lx; float *ly; int *winFound; boolean *didFind)
  22.  
  23.     x y where initWin findwindow
  24.     didFind winFound lx ly
  25. endps
  26.  
  27. // Return alpha value for current window
  28. defineps myCurrentWindowAlpha(int win; |int *alpha)
  29.     win currentwindowalpha alpha
  30. endps
  31.  
  32. // Return bounds of current window
  33. defineps myCurrentWindowBounds(int win; |float *x; float *y;
  34.                 float *w; float *h)
  35.     win currentwindowbounds h w y x
  36. endps
  37.  
  38.  
  39. // Return depth of current window
  40. defineps myCurrentWindowDepth(int win; |int *depth)
  41.     win currentwindowdepth depth
  42. endps
  43.  
  44. // Returns owner (i.e. context value) for current window
  45. defineps myCurrentOwner(int win; |int *context)
  46.     win currentowner context
  47. endps
  48.  
  49. // Sets level of current window
  50. defineps mySetCurrentWindowLevel(int level)
  51.     level currentwindow setwindowlevel
  52. endps
  53.  
  54. // Returns level of current window
  55. defineps myCurrentWindowLevel(int win; |int *level)
  56.     win currentowner level
  57. endps
  58.  
  59. // Orders given window on the screen list
  60. defineps myOrderWindow(int place; int otherwin; int win)
  61.     place otherwin win orderwindow
  62. endps
  63.  
  64.  
  65. // Fills window w2 with contents of all windows below level of w1
  66. defineps fillBelowWin(int w1; int w2)
  67.     Below w1 w2 fillwindow
  68. endps
  69.